//
// Created by iguilty on 2022-01-12.
//

#ifndef DESIGN_PATTERN_CPP_ABSTRACTFACTORY_H
#define DESIGN_PATTERN_CPP_ABSTRACTFACTORY_H

class AbstractProductA;
class AbstractProductB;

class AbstractFactory {
public:
    virtual ~AbstractFactory();
    virtual AbstractProductA* CreateProductA()=0;
    virtual AbstractProductB* CreateProductB()=0;

protected:
    AbstractFactory();
};

class ConcreteFactory1:public AbstractFactory{
public:
    ConcreteFactory1();
    ~ConcreteFactory1();
    AbstractProductA* CreateProductA();
    AbstractProductB* CreateProductB();
};

class ConcreteFactory2:public AbstractFactory{
public:
    ConcreteFactory2();
    ~ConcreteFactory2();
    AbstractProductA* CreateProductA();
    AbstractProductB* CreateProductB();
};

#endif //DESIGN_PATTERN_CPP_ABSTRACTFACTORY_H
